package com.example.javabasic.mianshi;

import java.util.concurrent.CyclicBarrier;

/**
 * 栅栏 demo
 */
public class CyclieBarrirDemo {
    public static void main(String[] args) {
        CyclicBarrier barr = new CyclicBarrier(2);
        new Thread(()->{
            boolean broken = barr.isBroken();
            System.out.println(broken);
        }).start();

    }
}
